package com.yami.shop.mystery.common.enums;

/**
 * @author wxf
 * @date 2023/4/19 14:12
 */
public enum ActivityRuleEnum {

    PREEMPTION("01","优先购"),

    DISCOUNTS("02","优惠购"),

    APPLY("03","报名"),

    INVITENUM("04","邀请人数"),

    PAYMENTAMOUNT("05","支付金额"),

    PAYMENTTIME("06","最近支付时间"),

    REGISTERTIME("07","注册时间"),

    PAYMENTNUM("08","支付次数"),

    HOLDPRODUCT("09","持有艺术品"),
    AUTOREPLENISH("10","自动补货")
    ;

    private final String value;
    private final String label;

    ActivityRuleEnum(String value, String label) {
        this.value = value;
        this.label = label;
    }

    public String getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    public static ActivityRuleEnum instance(String value) {
        ActivityRuleEnum[] enums = values();
        for (ActivityRuleEnum statusEnum : enums) {
            if (statusEnum.value.equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
}
